﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Zor_Modes;
using Zor_IDAL;

namespace Zor_DAL
{
    public class Main_DAL<T> where T : class
    {

        /// <summary>
        /// 获取角色权限菜单
        /// create by ternence at 2017.3.23
        /// </summary>
        /// <param name="us">当前登陆用户</param>
        /// <returns></returns>
        public static List<T> GetManuList(Sys_Users us)
        {
            var sql = @"select * from [dbo].[Sys_Jurisdiction] as sj 
                        left join [Sys_Navigations]  as sn 
                        on 
                        sj.Nav_Id = sn.Nav_Id 
                        where Roles_Id = @Roles_Id order by Nav_Sortnum asc";
            List<T> rsManuList = DapperQuery<T>.DoQueryList(sql, new { Roles_Id = us.Roles_Id });
            return rsManuList;
        }
    }
}
